<?php
namespace app\admin\controller\system\faq;

use app\common\model\Faq as Model;

use app\admin\classes\BasicManager;
use core\Api;
use core\V;
use core\Res;
use core\Func;

/**
 * 相册
 */


 class Faq extends BasicManager {

   static $model=Model::class;

   // static $view_index="news/index";
   // static $view_edit="news/edit";


   // static $hash="/admin/news";

   static $var="id,q,a";

   static $title=[
     "index"=>[
       "title"=>"FAQ管理",
       "breadcrumb"=>["系统","FAQ","列表"],
       "subtitle"=>"管理FAQ",
     ],
     "add"=>[
       "title"=>"添加FAQ",
       "breadcrumb"=>["系统","FAQ","添加"],
       "subtitle"=>"添加FAQ",
     ],
     "edit"=>[
       "title"=>"编辑FAQ",
       "breadcrumb"=>["系统","FAQ","编辑"],
       "subtitle"=>"编辑FAQ",
     ],

   ];



   public function edit_body(){
     static::$menuHash=$this->getHash()."/index";
     return '


     <el-form-item label="问题">
       <el-input v-model="form.q"></el-input>
     </el-form-item>


     <el-form-item label="解答">
      {:Lib::load("editor")}
       <c-editor v-model="form.a" upload="/admin/upload/image"></c-editor>
     </el-form-item>
     ';
   }
   public function index_body(){
     return '
     <el-table-column
       prop="q"
       label="问题">
     </el-table-column>

     ';
   }
   public function search_body(){
     return '
     <el-form-item label="">
       <el-input
         v-model="form.q"
         @keyup.enter.native="Search"
         placeholder="问题">
       </el-input>
     </el-form-item>


     ';
   }





 }
